package com.zb.designmode.decorate.example112;

import java.util.Date;

/**
 * <p>文件描述：</p>
 * <p>版权所有： 版权所有(C)2016-2099</p>
 * <p>内容摘要： </p>
 * <p>其他说明： </p>
 * Date 2019-05-06</p>
 * Author Bing.Zhao1
 *
 * @version 1.0
 */
public class XMLLogger extends Decorator {
    public XMLLogger(ILogger logger) {
        super(logger);
    }

    @Override
    public void log(String msg) {
        String s = "<msg>\r\n" +
                "<content>" + msg + "</content>\r\n" +
                "<time>" + new Date().toString() + "</time>\r\n" +
                "</msg>\r\n";
        logger.log(s);
    }
}
